
const store = {
  loading: new Proxy(
    {},
    {
      set: function (obj, prop, val) {
        store.setLoading.forEach((method) => {
          method(store.loading, prop, val)
        })
        return true
      }
    }
  ),
  setLoading: [],
  userInfo: new Proxy(
    {},
    {
      set: function (obj, prop, val) {
        store.setUserInfo.forEach((method) => {
          method(store.userInfo, prop, val)
        })
        return true
      }
    }
  ),
  setUserInfo: []
}

export default store
